<?php 

/******************************************************************************************
Use Case name and Id: 1.0 View Group Ride Event by Michael Puzon
Use Case name and Id: 3.0 Show Map by Kenneth Ng

by Michael Puzon,  lastupdated March 20, 2010
by Kenneth Ng, lastupdated March 24, 2010
Class: COIN 71

Functional Specification

The page issues a get request to view the Event, and sort Event.  User will be able to click
of the address and view the Map as well as Enter the "from" address to get the driving directions

Web Master Maintenance:
==================================================================================
Web Master need to acquire the Google Key when it install the site this google Key
is required for Google Map API to work.  The key will need to be copied to gmap.php.
Please see gmap.php for details
**********************************************************************************/


$title = "View Rides";
$additional_includes = ' 
	<link rel="stylesheet" type="text/css" href="include/css/viewride.css" />
   <script type="text/javascript" src="include/js/util.js"></script>   
   <script type="text/javascript" src="include/js/viewride.js"></script>
   <script type="text/javascript" src="include/js/modal-window.js"></script>
	<!-- JS code for gray box init -->
       <script type="text/javascript">
       var openMyModal = function(source)
       {
               modalWindow.windowId = "myModal";
               modalWindow.width = 480;
               modalWindow.height = 405;
               modalWindow.content = "<iframe style=\'width:535px; height:435px; border:none;\' allowtransparency=\'true\' src=\'" + source + "\'>Google Map of Ride</iframe>";
               modalWindow.open();
       };      
       </script>
       
       <link rel="stylesheet" type="text/css" href="include/css/greyBoxStyle.css" />
   ';
?>

<?php include('header.php'); ?>

    

        <p><a href="postride.php">Add a new event</a></p>
    <label>
    Sort Events by:
    <select name="options" id="ridesort">
                <option value="date">Date</option>
                <option value="rides">Rides</option>
        </select>
    </label>	
    <input type="button" value="Sort" id="sortBtn" onclick="sortList()"></input>
	<label>
	Show Past Rides
		<input type="checkbox" id="pastrides" onclick="sortList()"></input>
	</label>
        <br />
    <hr />
<div id = "output">

</div>

<?php include('footer.php'); ?>
